var fs = require('fs');
var path = require('path');

fs.readdir('./datas', function(err, files) {
    var configs = files.map(function(f, index) {
        return {
            name: f.split('.')[0],
            file: f,
            order: index
        };
    })
    fs.writeFile('./config.json', JSON.stringify(configs));
})
